import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';

@Component({
  selector: 'app-modal',
  templateUrl: './modal.component.html',
  styleUrls: ['./modal.component.less']
})
export class ModalComponent implements OnInit {

  @Input() componentList;
  @Input() style;
  @ViewChild('box') box: ElementRef;
  // scale;
  constructor() { }

  ngOnInit() {
      // const bWidth = this.box.nativeElement.offsetWidth;
      // const bHeight = this.box.nativeElement.offsetHeight;
      // const xScale = this.style.width / bWidth;
      // const yScale = this.style.height / bHeight;
      // this.scale = xScale > yScale ? yScale : xScale;
  }

}
